//
//  HSAboutWeController.swift
//  HomeSchoolDemo
//
//  Created by rimi on 16/9/28.
//  Copyright © 2016年 赖虹宇. All rights reserved.
//

import UIKit

class HSAboutWeController: UIViewController {
    var webView = UIWebView()
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
    }
    //点击返回按钮，回调事件
    @IBAction func backBtnClicked(_ sender: UIButton) {
        dismiss(animated: true, completion: nil)
    }
    //点击网址回调方法
    @IBAction func webBtnClicked(_ sender: UIButton) {
        let webVc = HSWebController()
        webVc.urlStr = sender.titleLabel?.text ?? ""
        present(webVc, animated: true, completion: nil)
        
        
    }
    //点击电话回调事件
    @IBAction func phoneBtnClicked(_ sender: UIButton) {
//        创建一个全局的网页视图对象
        let phoneUrl = URL(string: sender.titleLabel?.text ?? "")
        let request = URLRequest(url: phoneUrl!)
        webView.loadRequest(request)
        
    }
    override var preferredStatusBarStyle: UIStatusBarStyle{
        return .lightContent
    }
}
